Skip to content

feat(parser): add dataset and data-source parsing support#29

Merged
LostRhapsody merged 7 commits intomasterfrom
feat/datasets-data-sources
Apr 10, 2026
Merged

feat(parser): add dataset and data-source parsing support#29
LostRhapsody merged 7 commits intomasterfrom
feat/datasets-data-sources

Conversation

@LostRhapsody
Copy link
Copy Markdown
Contributor

Summary

  • Add full parsing support for ABL ProDataSet and DataSource constructs
  • Implement DEFINE DATASET with all documented clauses (DATA-RELATION, PARENT-ID-RELATION, RELATION-FIELDS, REPOSITION, NESTED, FOREIGN-KEY-HIDDEN, NOT-ACTIVE, RECURSIVE, REFERENCE-ONLY, SERIALIZABLE/NON-SERIALIZABLE, NEW SHARED)
  • Implement DEFINE DATA-SOURCE with QUERY and KEYS (field list + ROWID) clauses
  • Restructure CREATE statement with CreateTarget enum supporting DATASET, DATA-SOURCE, TEMP-TABLE with IN WIDGET-POOL
  • Extend DEFINE PARAMETER with TABLE, TABLE-HANDLE, DATASET, DATASET-HANDLE, BUFFER parameter types and HandlePassingOptions (APPEND, BIND, BY-VALUE)
  • Extract shared XmlSerializeOptions and retrofit on DEFINE TEMP-TABLE and DEFINE BUFFER (replacing skip-unknown-token hack)
  • Add ~20 new lexer keywords via keyword_overrides.toml + codegen
  • Fix hyphenated keyword matching for DATA-RELATION, DATA-SOURCE, DATASET-HANDLE

Testing

  • 28 new parser tests covering all clause combinations
  • All 329 existing tests pass (no regressions from AST restructuring)
  • Benchmark fixture added (bench_parser_datasets.abl) for CodSpeed regression detection
  • cargo clippy -D warnings passes
  • cargo fmt --check passes

Post-Deploy Monitoring & Validation

No additional operational monitoring required: this is a parser library with no runtime deployment.


Compound Engineered 🤖 Generated with Claude Code

Add ~20 new lexer keywords for dataset/data-source parsing.
Add XmlSerializeOptions, DefineDataset, DefineDataSource, DataRelation,
ParentIdRelation, DataSourceBuffer, DataSourceKeys types.
Restructure Statement::Create with CreateTarget enum.
Restructure Statement::DefineParameter with ParameterType enum.
Add xml_options field to DefineTempTable and DefineBuffer.
Implement parse_define_dataset() with DATA-RELATION, PARENT-ID-RELATION,
RELATION-FIELDS, all flags (REPOSITION, NESTED, FOREIGN-KEY-HIDDEN,
NOT-ACTIVE, RECURSIVE), REFERENCE-ONLY, and XML/serialize options.

Implement parse_define_data_source() with QUERY and KEYS clauses.

Extract parse_xml_serialize_options() helper and retrofit on
parse_define_temp_table() and parse_define_buffer().

Restructure parse_create_statement() with CreateTarget dispatch for
DATASET, DATA-SOURCE, and TEMP-TABLE with IN WIDGET-POOL.

Extend parse_define_parameter() with TABLE, TABLE-HANDLE, DATASET,
DATASET-HANDLE, and BUFFER parameter types.

Add NEW SHARED/SHARED and SERIALIZABLE/NON-SERIALIZABLE modifier
parsing in parse_define_statement() dispatch.
Add 28 new tests covering DEFINE DATASET (all clauses), DEFINE DATA-SOURCE
(QUERY, KEYS, ROWID), CREATE typed variants (DATASET, DATA-SOURCE,
TEMP-TABLE, Name), DEFINE PARAMETER extensions (TABLE, TABLE-HANDLE,
DATASET, DATASET-HANDLE, BUFFER, BIND/APPEND), and XML/serialize
option retrofit on DEFINE TEMP-TABLE and DEFINE BUFFER.

Fix hyphenated keyword matching for DATA-RELATION, DATA-SOURCE, and
DATASET-HANDLE — the HTML keyword index uses space-separated forms
but ABL source uses hyphens.
Add bench_parser_datasets.abl with diverse dataset/data-source
definitions for CodSpeed regression detection. Register in
parser_bench.rs. Apply cargo fmt across all changed files.
@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq bot commented Apr 9, 2026

Merging this PR will not alter performance

✅ 14 untouched benchmarks
🆕 1 new benchmark

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 datasets N/A 158.6 µs N/A

Comparing feat/datasets-data-sources (12b4041) with master (76b8b0f)

Open in CodSpeed

Adding Kind::Nested and other dataset keywords caused them to no longer
be recognized as valid identifiers in member access, method call, and
other identifier positions. Add all new unreserved keywords to
can_be_identifier() to fix chained member access parsing.
@LostRhapsody LostRhapsody merged commit ae26e42 into master Apr 10, 2026
6 checks passed
@LostRhapsody LostRhapsody deleted the feat/datasets-data-sources branch April 10, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant